// 房屋管理（公安、消防、管理）
import type { AppRouteModule } from '/@/router/types';

import { getParentLayout, LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const charts: AppRouteModule = {
  path: '/houseManager',
  name: 'HouseManager', // name 首字母必须加大写
  component: LAYOUT,
  redirect: '/houseManager/houseManage',
  meta: {
    orderNo: 301,
    icon: 'ion:bar-chart-outline',
    title: t('routes.demo.housemanager.root'),
    roles: ['Admin', 'City', 'Area', 'Street', 'Community', 'Investigator'],
    // userGroups: ['Admin', 'FireControl', 'Police'],
    userGroups: ['Admin', 'Housing', 'Police'],
    hideChildrenInMenu: true,
  },
  children: [
    {
      path: 'houseManage',
      name: 'houseManage',
      meta: {
        title: t('routes.demo.housemanager.root'),
        hideChildrenInMenu: true,
        roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
        // userGroups: ['Admin', 'FireControl'],
        userGroups: ['Admin', 'Housing', 'Police'],
      },
      component: () => import('/@/views/danger/fire/FireTable.vue'),
      children: [
        {
          path: 'detail/:id',
          name: 'fireTabDetail',
          component: () => import('/@/views/danger/fire/detail.vue'),
          meta: {
            currentActiveMenu: '/houseManager/housePlaceManager',
            title: t('routes.demo.dangerInvestigate.fireDetail'),
            hideMenu: true,
            dynamicLevel: 3,
            realPath: '/danger/fire/detail',
            roles: ['Admin', 'City', 'Area', 'Street', 'Community', 'Investigator'],
            // userGroups: ['Admin', 'FireControl'],
            userGroups: ['Admin', 'Housing', 'Police'],
          },
        },
      ],
    },
   
  ],
};

export default charts;
